<%@ page import="org.biojava.dasobert.dasregistry.*" %>
<jsp:useBean id="register" class="dasregistry.registryBean" scope="session"/>
<jsp:setProperty name="register" property="*"/> 

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

<% String title="get key";
   String header = title;
%>



<%@ include file="sangerheader.jsp" %>

<div id="main">

<h2> Requested Key for DAS server</h2>


<p>

<%@ include file="sangertablestart.jsp" %>


<p><b>
<%
    // init
    String serverurl = request.getParameter("url");
	String sendmailto = request.getParameter("sendmailto");
    if ( serverurl != null) {
    	 int status = register.requestKey(serverurl,sendmailto);
	 if ( status == 1 ) {
	 %> 
	 An email containing the key has been sent to the server administrator of <%=serverurl%>
	 <%
	 } else if ( status == 2 ) {
	 	out.println("Notification NOT sent. A notification has been requested recently before. To prevent flames it is only possible to send a request once per hour.");
	 } else if ( status == 3 ) {
	 	out.println("sorry, an unknown error occured");
	 }	 
	 else if ( status == 4 ) {
	 	out.println("the provided email does not match the email of the server admin");
	 }	else {
	 	out.println("unknown return code " + status);
	 }
    }

%>
</b></p>









<%@ include file="sangertableend.jsp" %>

</div>

<%@ include file="sangerfooter.jsp" %>


